package org.xydpeng.framework.l2cache.enums;

/**
 * @author xydpeng
 * @version v1.0
 * @date: 2024/6/6
 * @description:
 */
public enum RedisDataType {

    STRING("string"),

    HASH("hash"),
/*
    LIST("list"),

    SET("set"),

    ZSET("zset")*/;

    private String type;

    RedisDataType(String type) {
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public static RedisDataType fromString(String type) {
        for (RedisDataType e : RedisDataType.values()) {
            if (e.getType().equalsIgnoreCase(type)) {
                return e;
            }
        }
        throw new IllegalArgumentException("Invalid RedisDataType: " + type);
    }


}
